<?php if (!defined('THINK_PATH')) exit();?><form id="pagerForm" action="/Admin/Member/index" method="post">
    <input type="hidden" name="pageNum" value="<?php echo ($page['pageNum']); ?>"/>
<input type="hidden" name="numPerPage" value="<?php echo ($page['numPerPage']); ?>" />
	<input type="hidden" name="username" value="<?php echo ($search['username']); ?>" />
	<input type="hidden" name="nickname" value="<?php echo ($search['nickname']); ?>" />
	<input type="hidden" name="level" value="<?php echo ($search['level']); ?>" />
</form>

<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="/Admin/Member/memberList" method="post">
    <div class="searchBar">
        <ul class="searchContent">
            <li>用户名：<input type="text" name="username" value="<?php echo ($search['username']); ?>" /></li>
            
        	<li>角色：
				<select name="type">
					<option value="">请选择</option>
					<option value="1">普通会员</option>
					<option value="2">VIP会员</option>
            	</select>
			</li>
			<li>是否审核：
				<select name="status">
					<option value="">请选择</option>
            		<option value="1"<?php if($search['status'] == 1): ?>selected="selected"<?php endif; ?>>未审核</option>
            		<option value="2"<?php if($search['status'] == 2): ?>selected="selected"<?php endif; ?>>已审核</option>
            	</select>
			</li>
        </ul>
        <div class="subBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
            </ul>
        </div>
    </div>
    </form>
</div>

<div class="pageContent">
    <div class="panelBar" style="background:none;">
        <ul class="toolBar">
        	<li>
                <a class="add" href="/Admin/Member/add" target="dialog" width="600" height="500" title="添加">
                	<i class="iconfont">&#xe601;</i>
                    <span>添加</span>
                </a>
            </li>
            <li>
                <a class="edit" href="/Admin/Member/edit/id/{sid_user}" target="dialog" title="编辑"  width="600" height="500" >
                	<i class="iconfont">&#xe607;</i>
                    <span>编辑</span>
                </a>
            </li>
            <li>
                <a class="password" href="/Admin/Member/editPwd/id/{sid_user}" target="dialog" title="改密">
                	<i class="iconfont">&#xe605;</i>
                    <span>改密</span>
                </a>
            </li>
            <li>
                <a class="delete" href="/Admin/Member/remove" target="selectedTodo" rel="id" posttype="string" title="你确定要批量删除吗？">
                	<i class="iconfont">&#xe612;</i>
                    <span>删除</span>
                </a>
            </li>
            <li>
                <a class="audit" href="/Admin/Member/check" target="selectedTodo" rel="id" posttype="string" title="你确定要批量审核吗？">
                	<i class="iconfont">&#xe62c;</i>
                    <span>审核通过</span>
                </a>
            </li>
			<li>
                <a class="audit" href="/Admin/Member/check/status/1" target="selectedTodo" rel="id" posttype="string" title="你确定要批量锁定吗？">
                	<i class="iconfont">&#xe62c;</i>
                    <span>锁定作废</span>
                </a>
            </li>
			<li>
                <a class="audit" href="/Admin/Member/setMemberLevel/types/2" target="selectedTodo" rel="id" posttype="string" title="你确定要执行此操作吗？">
                	<i class="iconfont">&#xe605;</i>
                    <span>设为VIP</span>
                </a>
            </li>
			<li>
                <a class="audit" href="/Admin/Member/setMemberLevel/types/1" target="selectedTodo" rel="id" posttype="string" title="你确定要执行此操作吗？">
                	<i class="iconfont">&#xe605;</i>
                    <span>降为普通会员</span>
                </a>
            </li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="206">
        <thead>
        <tr>
            <th width="3%" class="txtMid"><input type="checkbox" group="id" class="checkboxCtrl" ></th>
            <th width="3%">编号</th>
            <th width="8%">用户名</th>
            <th width="6%">公司名称</th>
            <th width="8%">角色</th>
            <th width="7%">联系电话</th>
            <th width="10%">创建时间</th>
            <!--<th width="5%">是否启用</th>-->
            <th width="5%">是否审核</th>
            <th width="6%">操作</th>
            <!--<th width="10%">操作</th>-->
        </tr>
        </thead>
        <tbody>
        <?php if($dataList|count > 0): if(is_array($dataList)): $k = 0; $__LIST__ = $dataList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$value): $mod = ($k % 2 );++$k;?><tr target="sid_user" rel="<?php echo ($value['id']); ?>" >
                    <td class="txtMid"><input name="id" value="<?php echo ($value['id']); ?>" type="checkbox"></td>
                    <td class="txtMid"><?php echo ($key+1); ?></td>
                    <td><?php echo ($value['username']); ?></td>
                    <td><?php echo ($value['company_name']); ?></td>
                    <td><?php if($value["role"] == 'vip会员'): ?><span style="color:red"><?php echo ($value['role']); ?></span><?php else: echo ($value['role']); endif; ?></td>
                    <td><?php echo ($value['tel']); ?></td>
                    <td><?php echo (date('Y-m-d H:i:s',$value['create_time'])); ?></td>
                    <td>
                        <?php if($value['status'] == 1): ?><span style="color:red;" class="span_green" >锁定作废</span>
                        <?php else: ?>
                            <span style="color:green;" class="span_green" >已审核</span><?php endif; ?>
                    </td>
                    <td><a href="/Admin/Member/fahuo_list/uid/<?php echo ($value['id']); ?>" target="navTab" style="color: #09F" title="发货记录">查看历史发货记录</a></td>
                    <!--<td><a href="/Admin/Member/show/id/<?php echo ($value['id']); ?>"  class="alink1" target="navTab" rel="show" title='签到记录'><span style="color:red;" class="span_green" >[签到记录]</span></a>
                    <a href="/Admin/Member/details/id/<?php echo ($value['id']); ?>"  class="alink1" target="navTab" rel="details" title='查看详情'><span style="color:red;" class="span_green" >[查看详情]</span></a></td>-->
                </tr><?php endforeach; endif; else: echo "" ;endif; ?>
            <?php else: ?>
        <tr><td colspan="10" style="text-align:center;">没有数据!!!</td></tr><?php endif; ?>
        </tbody>
    </table>
    <div class="panelBar" style="background:none;">
    <div class="pages">
        <span>显示</span>
        <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
            <?php if(is_array($page['numPerPageArray'])): foreach($page['numPerPageArray'] as $key=>$vo): ?><option value="<?php echo ($vo); ?>"<?php if($vo == $page['numPerPage']): ?>selected='selected'<?php endif; ?>><?php echo ($vo); ?></option><?php endforeach; endif; ?>
        </select>
        <span>条，共<?php echo ($page['all']); ?>条</span>
    </div>
    <div class="pagination" targetType="navTab" totalCount="<?php echo ($page['all']); ?>" numPerPage="<?php echo ($page['numPerPage']); ?>" pageNumShown="10" currentPage="<?php echo ($page['pageNum']); ?>"></div>
</div>
</div>